
/* First created by JCasGen Thu Dec 11 21:29:44 GMT 2008 */
package org.idtem.component.freeling;

import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.cas.impl.CASImpl;
import org.apache.uima.cas.impl.FSGenerator;
import org.apache.uima.cas.FeatureStructure;
import org.apache.uima.cas.impl.TypeImpl;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.impl.FeatureImpl;
import org.apache.uima.cas.Feature;
import org.apache.uima.jcas.tcas.Annotation_Type;

/** 
 * Updated by JCasGen Mon Nov 09 23:03:54 UYST 2009
 * @generated */
public class Freeling2_Type extends Annotation_Type {
  /** @generated */
  protected FSGenerator getFSGenerator() {return fsGenerator;}
  /** @generated */
  private final FSGenerator fsGenerator = 
    new FSGenerator() {
      public FeatureStructure createFS(int addr, CASImpl cas) {
  			 if (Freeling2_Type.this.useExistingInstance) {
  			   // Return eq fs instance if already created
  		     FeatureStructure fs = Freeling2_Type.this.jcas.getJfsFromCaddr(addr);
  		     if (null == fs) {
  		       fs = new Freeling2(addr, Freeling2_Type.this);
  			   Freeling2_Type.this.jcas.putJfsFromCaddr(addr, fs);
  			   return fs;
  		     }
  		     return fs;
        } else return new Freeling2(addr, Freeling2_Type.this);
  	  }
    };
  /** @generated */
  public final static int typeIndexID = Freeling2.typeIndexID;
  /** @generated 
     @modifiable */
  public final static boolean featOkTst = JCasRegistry.getFeatOkTst("org.idtem.component.freeling.Freeling2");
 
  /** @generated */
  final Feature casFeat_word;
  /** @generated */
  final int     casFeatCode_word;
  /** @generated */ 
  public String getWord(int addr) {
        if (featOkTst && casFeat_word == null)
      jcas.throwFeatMissing("word", "org.idtem.component.freeling.Freeling2");
    return ll_cas.ll_getStringValue(addr, casFeatCode_word);
  }
  /** @generated */    
  public void setWord(int addr, String v) {
        if (featOkTst && casFeat_word == null)
      jcas.throwFeatMissing("word", "org.idtem.component.freeling.Freeling2");
    ll_cas.ll_setStringValue(addr, casFeatCode_word, v);}
    
  
 
  /** @generated */
  final Feature casFeat_lema;
  /** @generated */
  final int     casFeatCode_lema;
  /** @generated */ 
  public String getLema(int addr) {
        if (featOkTst && casFeat_lema == null)
      jcas.throwFeatMissing("lema", "org.idtem.component.freeling.Freeling2");
    return ll_cas.ll_getStringValue(addr, casFeatCode_lema);
  }
  /** @generated */    
  public void setLema(int addr, String v) {
        if (featOkTst && casFeat_lema == null)
      jcas.throwFeatMissing("lema", "org.idtem.component.freeling.Freeling2");
    ll_cas.ll_setStringValue(addr, casFeatCode_lema, v);}
    
  
 
  /** @generated */
  final Feature casFeat_eagles;
  /** @generated */
  final int     casFeatCode_eagles;
  /** @generated */ 
  public String getEagles(int addr) {
        if (featOkTst && casFeat_eagles == null)
      jcas.throwFeatMissing("eagles", "org.idtem.component.freeling.Freeling2");
    return ll_cas.ll_getStringValue(addr, casFeatCode_eagles);
  }
  /** @generated */    
  public void setEagles(int addr, String v) {
        if (featOkTst && casFeat_eagles == null)
      jcas.throwFeatMissing("eagles", "org.idtem.component.freeling.Freeling2");
    ll_cas.ll_setStringValue(addr, casFeatCode_eagles, v);}
    
  
 
  /** @generated */
  final Feature casFeat_offsets;
  /** @generated */
  final int     casFeatCode_offsets;
  /** @generated */ 
  public int getOffsets(int addr) {
        if (featOkTst && casFeat_offsets == null)
      jcas.throwFeatMissing("offsets", "org.idtem.component.freeling.Freeling2");
    return ll_cas.ll_getRefValue(addr, casFeatCode_offsets);
  }
  /** @generated */    
  public void setOffsets(int addr, int v) {
        if (featOkTst && casFeat_offsets == null)
      jcas.throwFeatMissing("offsets", "org.idtem.component.freeling.Freeling2");
    ll_cas.ll_setRefValue(addr, casFeatCode_offsets, v);}
    
   /** @generated */
  public String getOffsets(int addr, int i) {
        if (featOkTst && casFeat_offsets == null)
      jcas.throwFeatMissing("offsets", "org.idtem.component.freeling.Freeling2");
    if (lowLevelTypeChecks)
      return ll_cas.ll_getStringArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_offsets), i, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_offsets), i);
  return ll_cas.ll_getStringArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_offsets), i);
  }
   
  /** @generated */ 
  public void setOffsets(int addr, int i, String v) {
        if (featOkTst && casFeat_offsets == null)
      jcas.throwFeatMissing("offsets", "org.idtem.component.freeling.Freeling2");
    if (lowLevelTypeChecks)
      ll_cas.ll_setStringArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_offsets), i, v, true);
    jcas.checkArrayBounds(ll_cas.ll_getRefValue(addr, casFeatCode_offsets), i);
    ll_cas.ll_setStringArrayValue(ll_cas.ll_getRefValue(addr, casFeatCode_offsets), i, v);
  }
 
 
  /** @generated */
  final Feature casFeat_prob;
  /** @generated */
  final int     casFeatCode_prob;
  /** @generated */ 
  public String getProb(int addr) {
        if (featOkTst && casFeat_prob == null)
      jcas.throwFeatMissing("prob", "org.idtem.component.freeling.Freeling2");
    return ll_cas.ll_getStringValue(addr, casFeatCode_prob);
  }
  /** @generated */    
  public void setProb(int addr, String v) {
        if (featOkTst && casFeat_prob == null)
      jcas.throwFeatMissing("prob", "org.idtem.component.freeling.Freeling2");
    ll_cas.ll_setStringValue(addr, casFeatCode_prob, v);}
    
  



  /** initialize variables to correspond with Cas Type and Features
	* @generated */
  public Freeling2_Type(JCas jcas, Type casType) {
    super(jcas, casType);
    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator());

 
    casFeat_word = jcas.getRequiredFeatureDE(casType, "word", "uima.cas.String", featOkTst);
    casFeatCode_word  = (null == casFeat_word) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_word).getCode();

 
    casFeat_lema = jcas.getRequiredFeatureDE(casType, "lema", "uima.cas.String", featOkTst);
    casFeatCode_lema  = (null == casFeat_lema) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_lema).getCode();

 
    casFeat_eagles = jcas.getRequiredFeatureDE(casType, "eagles", "uima.cas.String", featOkTst);
    casFeatCode_eagles  = (null == casFeat_eagles) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_eagles).getCode();

 
    casFeat_offsets = jcas.getRequiredFeatureDE(casType, "offsets", "uima.cas.StringArray", featOkTst);
    casFeatCode_offsets  = (null == casFeat_offsets) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_offsets).getCode();

 
    casFeat_prob = jcas.getRequiredFeatureDE(casType, "prob", "uima.cas.String", featOkTst);
    casFeatCode_prob  = (null == casFeat_prob) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_prob).getCode();

  }
}



    